<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

/**
 * App\AreaLand
 *
 * @property int $id
 * @property string|null $value 配套名称
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|\App\AreaLand whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\AreaLand whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\AreaLand whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\AreaLand whereValue($value)
 * @mixin \Eloquent
 */
class AreaLand extends Model
{
    //
    protected $table = "area_land";
    public static function getSelectOptions()
    {
        $options = \DB::table('area_land')->select('id','value as text')->get();
        $selectOption = [];
        foreach ($options as $option){
            $selectOption[$option->id] = $option->text;
        }
        return $selectOption;
    }
}
